package com.meatball.data.dto

import io.swagger.v3.oas.annotations.media.Schema
import jakarta.validation.constraints.NotEmpty

/**
 * 语音转文本请求参数
 * @since 2023年12月25日
 * @author 张翔宇
 */
@Schema(description = "语音转文本请求参数")
data class SpeechReqDto(
    @Schema(description = "标志：ioc、wechat")
    @NotEmpty(message = "标志不能为空")
    val sign: String,

    @Schema(description = "园区名称，小程序端可以为空")
    val park: String,

    @Schema(description = "语音数组")
    val hex: ByteArray
) {
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return  false
        other as SpeechReqDto
        return hex.contentEquals(other.hex)
    }

    override fun hashCode(): Int {
        return hex.contentHashCode()
    }
}
